﻿using System;
using System.Collections.Generic;
using System.Text;
using Telerik.Web.UI;

namespace CarbonExchange.WebControls
{
    public class RadIndexColumn : GridColumn
    {
        public override void PrepareCell(System.Web.UI.WebControls.TableCell cell, GridItem item)
        {
            base.PrepareCell(cell, item);
            if (item is GridDataItem && item.DataSetIndex >= 0)
            {
                cell.Text = (item.DataSetIndex + 1).ToString();
            }
        }


        public override GridColumn Clone()
        {
            return new RadIndexColumn();
        }
    }
}
